package com.yiwyn.demo.controller;

import com.yiwyn.demo.context.SpringContext;
import com.yiwyn.demo.event.TestEvent;
import lombok.Getter;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @GetMapping("/test")
    public void test() {

        SpringContext.getApplicationContext().publishEvent(new TestEvent(this, "success"));

    }

}
